package animal;

public class Rabbit extends Thread {
	public void run() {
		for (int i = 1; i <= 20;) {
			System.out.println("兔子跑了" + i + "米");
			i = i + 10;
			if (i <= 20) {
				try {
					System.out.println("兔子睡了10秒");
					Thread.sleep(10000);
				} catch (InterruptedException e) {
				}
			} else {
				System.out.println("兔子到终点了！");
			}
		}
	}
}
